package com.ruoyi.planthopper.domain;

import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.List;

/**
 * @author Mr-Le
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
public class DetectionPlanthopperLog extends BaseEntity {

    /**
     * 序列号：用于版本控制
     */
    private static final long serialVersionUID = 1L;

    /**
     * 检测id
     */
    private Long detectionId;

    /**
     * 用户名
     */
    private String userName;

    /**
     * 原始文件名
     */
    private String originalFileName;

    /**
     * 图片路径
     */
    private String imagePath;

    /**
     * 缩略图路径
     */
    private String thumPath;

    /**
     * 检测结果图路径
     */
    private String resultPath;

    /**
     * 标签
     */
    private String tag;

    /**
     * 存放坐标点集合
     */
    private List<int[]> corner;

    /**
     * String 类型的坐标点信息
     */
    private String strCorner;

    /**
     * 图片拍摄时间提取
     */
    private String imgTime;

    /**
     * 测试用
     */
    private List<String> accuracy;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("detectionId", getDetectionId())
                .append("userName", getUserName())
                .append("resultImage", getResultPath())
                .append("imagePath", getImagePath())
                .append("thumPath", getThumPath())
                .append("originalFileName", getOriginalFileName())
                .append("tag", getTag())
                .append("corner", getCorner().toString())
                .append("strCorner", getStrCorner())
                .append("accuracy", getAccuracy())
                .append("imgTime", getImgTime())
                .toString();
    }
}
